import request from '@/utils/request'
//查询文章列表
export function selectList(query){
    return request({
        url:'/publish/article/list',
        method:'get',
        params:query
    })
}
//查询文章
export function selectArticleById(articleId){
    return request({
        url:'/publish/article/'+articleId,
        method:'get'
    })

}
//新增文章
export function insertArticle(data){
    return request({
        url:"/publish/article/add",
        method:'post',
        data:data
    })
}
//修改文章
export function updateArticle(data){
    return request({
        url:'/publish/article/edit',
        method:'put',
        data:data
    })
}
//删除文章
export function deleteArticleById(articleId){
    return request({
        url:'/publish/article/'+articleId,
        method:'delete'
    })
}
//查询栏目名称
export function selectColumnName(query){
    return request({
        url:"/publish/article/columnName",
        method:'get',
        params:query
    })
}
//状态
export function updateStatus(data){
  return request({
    url:"/publish/article/updateStatus",
    method:'put',
    data:data
  })
}

export function checkArticleCanRecall(articleId){
    return request({
        url:`/publish/article/checkCanRecall/${articleId}`,
        method:'get'
    })
}